package com.bcbim.operation_maintenance.table_head.mapper;

import com.bcbim.operation_maintenance_interface.table_head.dao.SpaceDepartmentTableHeadDAO;
import com.bcbim.operation_maintenance_interface.table_head.dto.TableCheckDTO;
import com.bcbim.operation_maintenance_interface.table_head.vo.SpaceDepartmentTableHeadVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @version V 1.0.0
 * @Description：业务部门表头设置
 * @Author: haomeijie
 * @Date: 2022/3/9 13:51
 **/
@Mapper
public interface SpaceDepartmentTableHeadMapper {

    /**
     * 判断用户是否设置过表头
     *
     * @param tableCheckDTO
     * @return int
     * @Author: haomeijie
     * @Date: 2022/3/9 9:49
     */
    int checkTableHeadByUserId(TableCheckDTO tableCheckDTO);

    /**
     * 查询表头设置列表
     *
     * @param tableCheckDTO 用户id
     * @return List<SpaceDepartmentTableHeadVO>
     * @Author: haomeijie
     * @Date: 2022/3/9 9:50
     */
    List<SpaceDepartmentTableHeadVO> listTableHead(TableCheckDTO tableCheckDTO);

    /**
     * 根据用户新增表头设置
     *
     * @param list
     * @return int
     * @Author: haomeijie
     * @Date: 2022/3/9 10:32
     */
    int batchInsertTableHead(List<SpaceDepartmentTableHeadDAO> list);

    /**
     * 根据用户修改表头设置
     *
     * @param list
     * @return int
     * @Author: haomeijie
     * @Date: 2022/3/9 10:32
     */
    int batchUpdateTableHead(List<SpaceDepartmentTableHeadDAO> list);

    /**
     * 根据用户修改表头设置取消勾选
     *
     * @param tableCheckDTO
     * @return int
     * @Author: haomeijie
     * @Date: 2022/3/9 10:32
     */
    int batchNoChecked(TableCheckDTO tableCheckDTO);

    /**
     * 查询用户勾选的表头
     *
     * @param userId
     * @return List<SpaceDepartmentTableHeadVO>
     * @Author: haomeijie
     * @Date: 2022/3/18 14:24
     */
    List<SpaceDepartmentTableHeadVO> selectCheckedTableByUserId(@Param("userId") String userId, @Param("projectId") String projectId);
}
